<script setup>
import {defineProps, defineEmits, computed} from "vue";
// import {isMobile} from "@/utils/func";

const prop = defineProps({
  total: {
    type: Number,
    default: () => 0
  },
  page: {
    type: Number,
    default: () => 1
  },
  size: {
    type: Number,
    default: ()=>30
  }
})
const emit = defineEmits(['getData'])
const getData = (page) => {
  emit("getData", page)
}
const layout = computed(() => {
  return "prev, pager, next,total,jumper"
})
</script>

<template>
  <el-pagination background :layout="layout" :total="prop.total" small :page-size="prop.size"
                 :current-page="prop.page" next-text="下一页" prev-text="上一页"
                 @current-change="getData"/>
</template>

<style scoped lang="less">
.el-pagination{
  justify-content: right;
  padding-right: 15px;
  margin-top: 15px;
}
</style>
